1. Field of Invention
The field of invention relates generally to computer systems and, more specifically but not exclusively, relates to efficiently supporting interrupts.
2. Background Information
Interrupts are used by devices of a computer system to gain the attention of a processor. Line-based interrupts, also known as Interrupt Request Lines (IRQs), involve dedicated circuit lines between devices, a controller, and the processor. Most personal computers (PCs) today have 15 IRQs available. A system employing an Input/Output Advanced Programmable Interrupt Controller (I/O APIC) may have 24 IRQs available.
The interrupt controller signals the processor that a device wants the processor's attention. The processor saves the memory address of the current operation in a stack and then responds to the interrupt. An interrupt vector corresponding to the interrupt is retrieved from an interrupt table. The interrupt vector points to a location in memory containing code for responding to the interrupt. This code is often referred to as an interrupt handler. The processor executes the interrupt handler. The time between the initial interrupt from the hardware device to the start of execution of the interrupt handler code is often referred to as interrupt latency. After completion of the interrupt handler, the processor retrieves the memory address from the stack and continues processing the interrupted instructions.
In today's computer systems, multiple devices often share the same interrupt line. For example, Peripheral Component Interconnect (PCI) interrupts are typically shared among four interrupt lines. The sharing of interrupts engenders a system where many device drivers must respond to an interrupt to determine which device actually sent the interrupt. This probing of devices wastes processor time and uses time expensive I/O bus transactions. Further, receiving interrupts from different devices simultaneously on a shared interrupt line can result in extended interrupt latency and even a hung machine.